package com.junjie.blibli.service;

import com.alibaba.fastjson.JSONObject;
import com.junjie.blibli.Entity.User;
import com.junjie.blibli.Entity.UserInfo;
import com.junjie.blibli.result.PageResult;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface UserService {

    void addUser(User user);

    String login(User user) throws Exception;

    User getUserInfo(Long userId);

    void updateUserInfos(UserInfo userInfo);

    User getUserById(Long followingId);

    List<UserInfo> getUserInfoByIds(Set<Long> followingIdSet);

    PageResult<UserInfo> pageListUserInfos(JSONObject params);

    Map<String, Object> loginForDts(User user) throws Exception;

    void logout(String refreshToken, Long userId);

    String refreshAccessToken(String refreshToken) throws Exception;

    List<UserInfo> batchGetUserInfoByUserIds(Set<Long> userIdList);

}
